<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/view/common/taglibs.jsp"%>
<s:if test="close">
	<script type="text/javascript">
		var win = top.window;
		win.opener.location.reload();
		window.close();
	</script>
</s:if>
<s:else>
<html>
	<head>
		<title>选择用户</title>
		<script src="${contextPath}/scripts/jquery/jquery-1.8.3.min.js" type="text/javascript"></script>
		<script src="${contextPath}/scripts/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
	</head>
<body>
<script type="text/javascript">
		function jumpPage(page) {
			var searchForm = document.searchForm;
			searchForm.action = "<s:property value='contextPath'/>/pm/user/choose.do?currentPage=" + page;
			searchForm.submit();
		}
		function add() {
			var searchForm = document.searchForm;
			searchForm.action = "<s:property value='contextPath'/>/pm/user/addUserList.do";
			searchForm.submit();
		}
		function a(){
			window.close();
		}
		function tes(){
			add();certificate
		}
		function clear1(){
			document.getElementById("realName").value="";
		}
		function search() {
			var searchForm = document.searchForm;
			searchForm.action = "<s:property value='contextPath'/>/pm/user/choose.do";
			searchForm.submit();
		}
		</script>
	<table width="100%" border="0" cellpadding="0" cellspacing="0">
		<tr>
			<td height="25" align="left"><font color="#0066CC"><strong>人员列表：</strong></font></td>
			<td height="25" align="right"></td>
		</tr>
	</table>
	<form name="searchForm" id="searchForm" method="post" action="addUserList.do">
			<input type="hidden" name="pmId" value="<s:property value="pmUserList.id"/>" />
			<input type="hidden" name="id" value="<s:property value="id"/>" />
			<input type="hidden" name="redirectUrl" value='<s:property value='redirectUrl'/>'/>
			<table width="100%" border="0" cellpadding="1" cellspacing="1" bgcolor="#CCCCCC">
				 <tr>
	        	<td class="right-td-width-bg">姓名：</td>
	        	<td colspan="2">
	        		<input type="text" id="realName" name="us.realName" value="${us.realName }" class="input" size="20"/>
	        	</td>
	        	<td colspan="2">  </td>
	        </tr>
	        <tr style="background:url(${contextPath}/images/xt_main_right_dhbj.jpg) repeat-x;">
					<td colspan="5" align="right">
				    	<input type="button" class="btn_clear_form" value="" onclick="clear1()"/>
				    	<input type="button" value="" class="btn_query" onclick="search()"/>
			    	</td>
			</tr>
				  <tr>
				    <td width="5%" class="top-td-width-bg">&nbsp;</td> 
				    <td width="5%" class="top-td-width-bg">序号</td>
					<td width="30%" class="top-td-width-bg">姓名</td>
					<td width="30%" class="top-td-width-bg">性别</td>
					<td width="35%" class="top-td-width-bg">入职时间</td>
				  </tr>
				 <s:iterator value="page.result" status="st" id="i">
					<tr>
					  <td class="down-left-td-width-bg">
					  <input type="checkbox" name="userId" id="checkbox" value="${i.id }"
					  	<s:iterator value="pmUserList.users" id="c">
					  		<s:if test="#i.id==#c.id">checked="checked"</s:if>
					  	 </s:iterator>
					  /></td> 
						<td class="down-left-td-width-bg"><s:property value="#st.index+1"/></td>
					    <td class="down-left-td-width-bg"><a href="javascript:choose('<s:property value="id"/>','<s:property value="realName"/>')"><s:property value="realName"/></a></td>
						<td class="down-left-td-width-bg">${sex }</td>
						<td class="down-left-td-width-bg"><s:date name="entryDate" format="yyyy-MM-dd"/></td>
					</tr>
				</s:iterator>
			    <tr bgcolor="#F9FCEF">
				   <td height="36" colspan="13" align="center"><label>
				     <input type="submit" name="button" onclick="tes();" id="button" value="提交" />
		          </label></td>
			    </tr>
			    <tr bgcolor="#F9FCEF"> 
					 <td height="36" colspan="13" align="center">
							<%@ include file="/WEB-INF/view/common/pagination.jsp"%>
					 </td>
				</tr>
			</table>
		</form>
	</body>
</html>
</s:else>